<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="app" uri="http://www.wanrenhui.com"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<%@include file="/res/include/base-head.jsp"%>
<%@include file="/res/include/jquery-easyui.jsp"%>
<script type="text/javascript" src="${pageContext.request.contextPath}/res/js/draw/drawBatch.js"></script>
</head>
<body>
<form id="data-form">
	<div class="form_item">
		<input name="id" value="${detail.id}" type="hidden"/>
		<dl>
			<dt>奖品名称：</dt>
			<dd>
				<c:out value="${detail.drawItemName}" />
			</dd>
		</dl>
		<dl>
			<dt>描述：</dt>
			<dd>
				<img src="${detail.drawItemImg}" alt="" height="60" width="60" />
			</dd>
		</dl>
		<dl>
			<dt>数量：</dt>
			<dd>
				<input  value="${detail.quantity}" name="quantity" id="quantity"/><c:if test="${null!=couponBaseVo}">  优惠卷数量(${couponBaseVo.quantity})</c:if>
			</dd>
		</dl>
		<dl>
			<dt>中奖率(1-1000)：</dt>
			<dd>
				<input  value="${detail.rate}" name="rate" id="rate"/>
			</dd>
		</dl>
		<p class="page_btn"><input type="button" id="saveBtn" value="保存" class="btn_blue" onclick="update();"/></p>
	</div>
</form>
<script type="text/javascript">
function update(){
	var data = $('#data-form').form('jsonObject');
	var url = contextPath + '/draw/batch/update';
	 $.post(url, data, function(data) {
		 if (data.code == 1) {
		 	top.addTab("",'抽奖批次', contextPath+'/draw/batch/list');
		} else {
			top.showInfo(data.msg);
		}
	});
}
</script>
</body>
</html>
